{% extends "base.html" %}
{% set active_page = "stats" %}
{% set page_title = 'User Stats - Mining and account information for user ' +  username %}
{% block body %}
<script>
  {# Initial graph generation #}
  $(function () {
    generate_graph(
        $('#tempchart'),
        {address: '{{ username }}', worker: '{{ worker }}', stat: 'temperature'},
        "lineChart",
        false,
        "devices");
    generate_graph(
        $('#hashrate'),
        {address: '{{ username }}', worker: '{{ worker }}', stat: 'hashrate'},
        "stackedAreaChart",
        false,
        "devices");
  });
  //generate_graph($('#hash-chart'), 'hour', '%H:%M %p', '{{ username }}', '{{ worker }}', 'hash');

</script>
<div class="container">
  <div class="row page-header">
    <h2 style="word-wrap:break-word;margin-bottom:2px;">Worker Stats - {{ worker }} </h2>
  </div>
  <div class="row row-header">
    <h2>Temperature History</h2>
    <div class="col-lg-12" id="tempchart">
      <ul class="nav nav-tabs">
        <li class="tab hour"><a>Hour</a></li>
        <li class="tab day"><a>Day</a></li>
        <li class="tab month"><a>Month</a></li>
      </ul>
    <div style="height:400px;">
      <img src="{{ config['assets_address'] | safe }}/img/712.GIF" style="position:absolute;padding-top:150px;padding-left:400px;"><svg></svg>
    </div>
  </div>
  </div>
  <div class="row row-header">
    <h2>Hashrate History</h2>
    <div class="col-lg-12" id="hashrate">
      <ul class="nav nav-tabs">
        <li class="tab hour"><a>Hour</a></li>
        <li class="tab day"><a>Day</a></li>
        <li class="tab month"><a>Month</a></li>
      </ul>
    <div style="height:400px;">
      <img src="{{ config['assets_address'] | safe }}/img/712.GIF" style="position:absolute;padding-top:150px;padding-left:400px;"><svg></svg>
    </div>
  </div>
  </div>
</div>
{% endblock %}
